package com.arpa.wms.domain.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.arpa.wms.domain.entity.BasicEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 出货单DTO
 * </p>
 *
 * @author LEO
 * @since 2020-08-07
 */
@Data
@ApiModel(value="DeliveryVO对象", description="出货单")
public class DeliveryVO extends BasicEntity implements Serializable {

    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "状态,0-新增。1-待分配，2-部分分配，3-已分配，4-已作废,9已取消")
    private String status;

    @ApiModelProperty(value = "数据来源（暂无）")
    private String datasource;

    @ApiModelProperty(value = "仓库")
    private String warehouseCode;

    @ApiModelProperty(value = "仓库名称")
    private String warehouseName;

    @ApiModelProperty(value = "入驻商")
    private String shipmentCode;

    @ApiModelProperty(value = "货主名称")
    private String shipmentName;

    @ApiModelProperty(value = "店铺")
    private String shopNick;

    @ApiModelProperty(value = "波次单号")
    private String wavePickingCode;

    @ApiModelProperty(value = "原始单号")
    private String deliveryOrderCode;

    @ApiModelProperty(value = "isv单号（暂无）")
    private String isvCode;

    @ApiModelProperty(value = "订单号")
    private String code;

    @ApiModelProperty(value = "单据类型")
    private String type;

    @ApiModelProperty(value = "运单号 ")
    private String waybillCode;

    @ApiModelProperty(value = "商品种类数量")
    private BigDecimal goodsSortQuantity;

    //这个字段和goodsSortQuantity等同的
    @ApiModelProperty(value = "商品品数")
    private BigDecimal sku;

    @ApiModelProperty(value = "件数")
    private String totalNum;

    @ApiModelProperty(value = "分配数量")
    private BigDecimal distributionNum;

    @ApiModelProperty(value = "重量（暂无）")
    private String weight;

    @ApiModelProperty(value = "体积")
    private String volume;

    @ApiModelProperty(value = "金额（暂无）")
    private String money;

    @ApiModelProperty(value = "所属机构")
    private String groupCode;

    @ApiModelProperty(value = "所属机构名称")
    private String groupName;

    @ApiModelProperty(value = "客户")
    private String customerCode;

    @ApiModelProperty(value = "客户名称")
    private String customerName;

    @ApiModelProperty(value = "供应商,发货退货单关联的收货单的供应商")
    private String supplierCode;

    @ApiModelProperty(value = "供应商,发货退货单关联的收货单的供应商")
    private String supplierName;

    @ApiModelProperty(value = "来源单号")
    private String sourceCode;

    @ApiModelProperty(value = "退货数量")
    private BigDecimal refundQuantity;

    @ApiModelProperty(value = "分拣数量")
    private BigDecimal pickNum;

    @ApiModelProperty(value = "发货数量")
    private BigDecimal sendNum;

    @ApiModelProperty(value = "单据类型描述")
    private String typeText;

    @ApiModelProperty(value = "版本号")
    private Integer version;

    @ApiModelProperty(value = "状态描述")
    private String statusText;

    @ApiModelProperty(value = "创建人描述")
    private String createdName;

    @ApiModelProperty(value = "修改人描述")
    private String modifiedName;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "总数")
    private Long total;

    @ApiModelProperty(value = "分配关联明细信息列表")
    private List<DeliveryItemWithDistributionVO> deliveryItemWithDistributionVOList;

    @ApiModelProperty(value = "明细信息列表")
    private List<DeliveryItemVO> deliveryItemVOList;

    @ApiModelProperty(value = "物流公司名称")
    private String logisticsName;

    @ApiModelProperty(value = "单据来源；wms: 手工创建； oms：OMS；qimen：奇门； other：其他；")
    private String sourceType;

    @ApiModelProperty(value = "单据来源翻译；wms: 手工创建； oms：OMS；qimen：奇门； other：其他；")
    private String sourceTypeText;

    /**
     * 物流公司编码(SF=顺丰、EMS=标准快递、EYB=经济快件、ZJS=宅急送、YTO=圆通 、ZTO=中 通(ZTO)、HTKY=百世汇通、UC=优速、STO=申通、TTKDEX=天天快递、QFKD=全峰、FAST=快捷 、POSTB=邮政小包、 GTO=国通、YUNDA=韵达、JD=京东配送、DD=当当宅配、AMAZON=亚马逊物流、 OTHER=其他)
     */
    @TableField("logistics_code")
    private String logisticsCode;

    /**
     * 出库单类型(JYCK=一般交易出库单;HHCK=换货出库单;BFCK=补发出库单;QTCK=其他出库单)
     */
    @TableField("order_type")
    private String orderType;


    /**
     * 前台订单/店铺订单的创建时间/下单时间
     */
    @TableField("place_order_time")
    private String placeOrderTime;

    /**
     * 发件人名称
     */
    @TableField("sender_name")
    private String senderName;

    /**
     * 发件人移动电话
     */
    @TableField("sender_mobile")
    private String senderMobile;

    /**
     * 发件人省份
     */
    @TableField("sender_province")
    private String senderProvince;

    /**
     * 发件人城市
     */
    @TableField("sender_city")
    private String senderCity;

    /**
     * 发件人详细地址
     */
    @TableField("sender_detail_address")
    private String senderDetailAddress;

    /**
     * 收件人姓名
     */
    @TableField("receiver_name")
    private String receiverName;

    /**
     * 收件人移动电话
     */
    @TableField("receiver_mobile")
    private String receiverMobile;

    /**
     * 承运商编码
     */
    @ApiModelProperty(value = "承运商编码")
    private String carrierCode;

    /**
     * 承运商名称
     */
    @ApiModelProperty(value = "承运商名称")
    private String carrierName;

    /**
     * 收件人省份
     */
    @TableField("receiver_province")
    private String receiverProvince;

    /**
     * 收件人城市
     */
    @TableField("receiver_city")
    private String receiverCity;

    /**
     * 收件人详细地址
     */
    @TableField("receiver_detail_address")
    private String receiverDetailAddress;

    /**
     * 接口联调customerId
     */
    @TableField("customer_id")
    private String customerId;

    /**
     * 临时码用于波次创建查询
     */
    @TableField("temporary_code")
    private String temporaryCode;

    @TableField("source_platform_code")
    private String sourcePlatformCode;

    @ApiModelProperty(value = "订单来源平台名称")
    private String sourcePlatformName;

    @TableField("signature")
    private String signature;

    @TableField("template_url")
    private String templateUrl;

    /**
     * 发件人区县
     */
    @TableField("sender_district")
    private String senderDistrict;

    /**
     * 收件人区县
     */
    @TableField("receiver_district")
    private String receiverDistrict;

    @TableField("is_cancel")
    private Integer isCancel;

    /**
     * 订单标识
     */
    @TableField("order_tag")
    private String orderTag;

    @ApiModelProperty(value = "订单序号")
    private Integer orderNum;

    @ApiModelProperty(value = "仓库编码")
    private String warehouseSerialNumber;

    @ApiModelProperty(value = "复核数量")
    private BigDecimal recheckQuantity;

    @ApiModelProperty(value = "是否oms下发的；0：否；1：是；用于后期判断反填oms数据")
    private Integer isOmsOrder;

    @ApiModelProperty(value = "拣货缺货数量")
    private BigDecimal pickStockOutNum;
    /**
     * 面单打印信息
     */
    @ApiModelProperty(value = "面单打印信息")
    private String printData;
    /**
     * 三段码
     */
    @ApiModelProperty(value = "三段码")
    private String routeCode;
    /**
     * 集包地编码
     */
    @ApiModelProperty(value = "集包地编码")
    private String consolidation;

    @ApiModelProperty(value = "波次内订单数量")
    private Integer orderQuantity;

    @ApiModelProperty(value = "快递类型")
    private String carrierType;
    @ApiModelProperty(value = "快递类型名称")
    private String carrierTypeName;

    /**
     * 缺货是否发货标识 0-不发货  1-发货
     */
    @ApiModelProperty(value = "缺货是否发货标识")
    private Integer isDeliveringIfStockout;

    /**
     * 面单打印次数
     */
    @ApiModelProperty(value = "面单打印次数")
    private Integer waybillPrintCount;

    /**
     * 打包任务下发:0否1是
     */
    @ApiModelProperty(value = "打包任务下发:0否1是")
    private Integer packIssue;

    /**
     * 贴单任务下发:0否1是
     */
    @ApiModelProperty(value = "贴单任务下发:0否1是")
    private Integer pasteIssue;

    @ApiModelProperty(value = "预打包单号")
    private String prepackagedCode;

    @ApiModelProperty(value = "承运商平台类型")
    private String platformType;

    @ApiModelProperty(value = "是否预打包订单:0否1是")
    private Integer prepackaged;

    @ApiModelProperty(value = "收件人ID")
    private String oaid;

    @ApiModelProperty(value = "包材名称")
    private String packingMaterialName;

    @ApiModelProperty(value = "包裹数")
    private Integer packageNum;

    @ApiModelProperty(value = "拆分运单号")
    private String splitWaybillCode;

    @ApiModelProperty(value = "店铺手机号")
    private String shopNickPhone;

    @ApiModelProperty(value = "出库完成时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime outboundCompletionTime;

    @ApiModelProperty(value = "获取面单失败原因")
    private String failureReasonOfGettingWaybill;

    @ApiModelProperty(value = "任务状态，1-未执行，2-执行中，3-执行完成")
    private String taskStatus;
}
